package org.example.jnautil.key;

import java.util.concurrent.BlockingQueue;

public class RegisterItem implements RegisteredKey {
 String keyId;
      KeyCodeEnum firstCode;
      KeyCodeEnum secondCode;
    final boolean block;

    public RegisterItem(KeyCodeEnum firstCode, KeyCodeEnum secondCode, boolean block) {
        this.firstCode = firstCode;
        this.secondCode = secondCode;
        this.block = block;
    }
    public RegisterItem(String keyId, boolean block) {
        this.keyId = keyId;

        this.block = block;
    }

    @Override
    public String keyId() {
        if(keyId!=null){
            return keyId;
        }
        return KeyCodeEnum.combineName(firstCode, secondCode);
    }

    @Override
    public boolean isRunning() {
        return false;
    }

    @Override
    public boolean isBlocking() {
        return block;
    }

    @Override
    public BlockingQueue<String> getQueue() {
        return null;
    }
}
